package com.rui.composite.obj;

/**
 * @Description: 菜单组件
 * @Author: ZhangRui
 * @Date: 2023/3/3 10:59
 * @Version: 1.0
 */
public abstract class MenuComponent {

    public String name;

    public Integer level;

    public void add(MenuComponent menuComponent) {
        throw new UnsupportedOperationException("不支持添加操作!");
    }

    public void remove(MenuComponent menuComponent) {
        throw new UnsupportedOperationException("不支持删除操作!");
    }

    public MenuComponent getChild(Integer i) {
        throw new UnsupportedOperationException("不支持获取子菜单操作!");
    }

    public String getName() {
        throw new UnsupportedOperationException("不支持获取名字操作!");
    }

    public void print() {
        throw new UnsupportedOperationException("不支持打印操作!");
    }
}
